package com.hsbc.dev.teamo4.sms.sm.po;

import com.hsbc.dev.teamo4.sms.common.base.EntityBean;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;

/**
 * @author:Kevin
 * @version:
 * @Project: permission_manage
 * @Package: com.hsbc.dev.teamo4.sms.sm.po
 * @Description:
 * @Date date: 2018/7/28
 */
public class Department extends EntityBean{

    private String id;
    @NotBlank(message = "departmentName can not be empty")
    @Length(max = 16,min = 2,message = "The department Length must be Between 2 and 15")
    private String departmentName;
    private String parentId;
    @NotNull(message = "the departmentLevel can not be empty")
    private String departmentLevel;
    @NotNull(message = "the departmentOrder can not be empty")
    private int departmentOrder;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getDepartmentLevel() {
        return departmentLevel;
    }

    public void setDepartmentLevel(String departmentLevel) {
        this.departmentLevel = departmentLevel;
    }

    public int getDepartmentOrder() {
        return departmentOrder;
    }

    public void setDepartmentOrder(int departmentOrder) {
        this.departmentOrder = departmentOrder;
    }

    @Override
    public String toString() {
        return "Department{" +
                "id='" + id + '\'' +
                ", departmentName='" + departmentName + '\'' +
                ", parentId='" + parentId + '\'' +
                ", departmentLevel=" + departmentLevel +
                ", departmentOrder=" + departmentOrder +
                super.toString()+'\'' +
                '}';
    }
}
